package com.alibaba.algo.dao.user;

import com.alibaba.algo.cooperation.feign.vo.req.SelectRoleByOrgVO;
import com.alibaba.algo.cooperation.usercomponent.vo.res.user.SysOrgInfoVO;
import com.alibaba.algo.core.base.BaseMapper;
import com.alibaba.algo.entity.user.SysOrgRole;
import com.alibaba.algo.entity.user.SysRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 组织和组织角色关联Mapper
 */
public interface SysOrgRoleMapper extends BaseMapper<SysOrgRole> {

    void deleteByRoleId(Long roleId);

    List<SysOrgInfoVO> selectOrgListByRoleId(Long roleId);

    List<SysOrgInfoVO> selectOrgListWithIsDeletedByRoleId(Long roleId,String isDeleted);

    List<SysRole> selectRoleListByOrgCondition(@Param("obj") SelectRoleByOrgVO vo);

    Integer updateByRoleId(@Param("obj") SysOrgRole sysOrgRole);
}
